package com.ysd.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ysd.entity.Order;
import com.ysd.mapper.OrderMapper;
import com.ysd.service.OrderService;

@Service
public class OrderServiceImpl implements OrderService {

	@Autowired
	OrderMapper orderMapper;

	@Override
	public List<Order> findOrders(int uid) {
		return orderMapper.getOrders(uid);
	}

	@Override
	public List<Order> findOrdersByStatus(Order order) {
		return orderMapper.getOrdersByStatus(order);
	}

	@Override
	public int updateOrder(Order order) {
		return orderMapper.upOrder(order);
	}

	@Override
	public List<Order> findOrdersByWhere(Order order) {
		return orderMapper.getOrdersByWhere(order);
	}

	@Override
	public int findOrderCount(Order order) {
		// TODO Auto-generated method stub
		return orderMapper.getOrderCount(order);
	}

	@Override
	public int updateOrderStatus(Order order) {
		// TODO Auto-generated method stub
		return orderMapper.upOrderStatus(order);
	}

	@Override
	public int findOrders(Order order) {
		// TODO Auto-generated method stub
		return orderMapper.addOrders(order);
	}

	@Override
	public List<Order> findOrderByWheres(Order order) {
		// TODO Auto-generated method stub
		return orderMapper.getOrderByWheres(order);
	}

	@Override
	public int findOrderSta(int userId) {
		// TODO Auto-generated method stub
		return orderMapper.updateOrderSta(userId);
	}

}
